
<script setup lang="ts">
  import { ref } from 'vue';
  const emit = defineEmits(['helloChange']);
  //声明props
  const props = defineProps({
    msg: {
      type: String,
      required: true
    }
  });
  const msgText = props.msg;
  const count = ref(0);


const change = () => {
  emit('helloChange')
};
  </script>
<template>
  <h1>{{ msgText }}</h1>
  <div class="box" @click="change"></div>
 
</template>
<style scoped>
.read-the-docs {
  color: #888;
}
.box{
  width: 750px;
  height: 75px;
  background-color: red;
}
</style>
